package org.ws.edu.task1.pool;

import org.ws.edu.task1.IConsoleHandler;

public class CalcNumMain implements IConsoleHandler {

    CalcNum cn = new CalcNum();

    public String handle(String line) {
        if (line.length() == 0) {
            System.err.println("Sring was not itroduced!!!" + "\n");
        } else {
            line = cn.calculateLine(line);
            if (line == null) {
                System.err.print("Error input string!!!" + "\n");
            } else {
                return line;
            }
        }
        return null;
    }
}